<html>
<head>
  <title>The source code</title>
    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
</head>
<body  onload="prettyPrint();">
    <pre class="prettyprint lang-js">Ext.onReady(function(){
	var win = window.nativeWindow;
	var opener = Ext.air.NativeWindow.getRootHtmlWindow();
	
	var d = new Date().clearTime(true);
	d = d.add('mi', opener.Ext.state.Manager.get('defaultReminder'));
	
	var time = new Ext.get('time');
	time.dom.value = d.format('g:i A');	
	
	var ok = new Ext.Button({
		text: 'OK',
		minWidth: 80,
		renderTo: 'btns',
		handler: function(){
			var t = Date.parseDate(time.getValue(), 'g:i A');
			if(t){
				var m = t.getMinutes() + (t.getHours()*60);
				opener.Ext.state.Manager.set('defaultReminder', m);
			}
			win.close();
		}
	});
	
	var close = new Ext.Button({
		text: 'Cancel',
		minWidth: 80,
		renderTo: 'btns',
		handler: function(){
			win.close();
		}
	});
	
	win.visible = true;
	win.activate();
});

    

</pre>    
</body>
</html>